﻿<%@ Page Title="产品详情" Language="C#" MasterPageFile="~/Wap/Shop/ShopSite.Master" AutoEventWireup="true" CodeBehind="ProductDetail.aspx.cs" Inherits="ZLCMS.Web.Wap.Shop.ProductDetail" %>

<%@ Import Namespace="ZLCMS.Business.Util" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
    <link href="css/jquery.bxslider.css" rel="stylesheet" type="text/css" />

    <link href="/Wap/lib/validator-0.7.0/css/jquery.validator.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="/wap/lib/bxslider/jquery.bxslider.js"></script>
    
    <script src="/Wap/lib/validator-0.7.0/jquery.validator.js" type="text/javascript"></script>
    <script src="/Wap/lib/validator-0.7.0/local/zh_CN.js" type="text/javascript"></script>
    
	<link href="/wap/lib/jquerymobile_datepicker/css/datepicker.css" rel="stylesheet" type="text/css" />
    <script src="/wap/lib/jquerymobile_datepicker/js/bootstrap-datepicker.js" type="text/javascript"></script>

    <script type="text/javascript" src="/wap/lib/common/formdisplay.js?ver=1.0"></script>
    <script src="../lib/jquery/jquery.fly.min.js" type="text/javascript"></script>
    <script src="/wap/lib/jquery-countdown/dist/jquery.countdown.min.js" type="text/javascript"></script>
    <script src="https://cdn.bootcss.com/layer/3.0.3/mobile/layer.js" type="text/javascript"></script>
    
    <!-- <script src="http://cms.weixinmvp.com/assets/plugins/vConsole/vconsole.min.js"></script>
	<script type="text/javascript">
    	// if (window.location.search.indexOf('debud') >= 0) {
	    	var vconsole = new VConsole();
    	// }
	</script> -->
    <script>
        var _hmt = _hmt || [];
    </script>

      <!--s fixed 顶部-->
    <!--E banner-->
    <style type="text/css">
	.ui-tabs{ padding:0;}
	#nav ul li:first-child{ border-left:none;}
	.banner1{ padding-bottom:0.5em;}
    /* .bx-wrapper .bx-pager,.bx-wrapper .bx-controls-auto{ bottom:0;} */
    .bx-wrapper {
        position: relative;
        z-index: 2;
    }
    .bx-wrapper .bx-pager,
    .bx-wrapper .bx-controls-auto {
        bottom: 10px;
        width: 60px;
        height: 24px;
        background: #ccc;
        color: white;
        border-radius: 18px;
        padding: 0;
        line-height: 24px;
        right: 5%;
    }
    .bx-wrapper-bg {
        position: absolute;
        top: 0;
        display: block;
        bottom: 0;
        width: 15px;
        right: 10px;
        z-index: 1;
        height: 125px;
        display: none;
        margin: auto;
        overflow: hidden;
        color: #999;
    }
	.banner1 .bx-wrapper .bx-pager.bx-default-pager a{ background:#fff;}
	.banner1 .bx-wrapper .bx-pager.bx-default-pager a:hover,.banner1 .bx-wrapper .bx-pager.bx-default-pager a.active { background:#b0916a;}
	#mypage .ui-input-text{ box-shadow:none; margin:0; border:none; border-radius:0;}
	#mypage .ui-input-text input{ text-align:center; height:30px;}
	.details_btn .ui-btn{ box-shadow:none;}
	#mypage .ui-footer{ background:#dadada;padding:5px 0 0;}
	#mypage .ui-footer .ui-btn{ width:70%;}
	#mypage .details_btn li a{ color:#fff; font-family:"微软雅黑"; font-weight:normal; font-size:14px;}

	.details_btn{ margin:0;}
	#mypage .ui-checkbox .ui-btn{ background:#fff; border:1px solid #fff;}
	#mypage .ui-checkbox{ margin:0; float:right; margin-top:16px;}
	#mypage .ui-btn.ui-checkbox-off::after, .ui-btn.ui-checkbox-on::after, .ui-btn.ui-radio-off::after, .ui-btn.ui-radio-on::after{ margin:-9px 0 0 19px;}
	#mypage .ui-popup-container{z-index: 11000;}
	#tabs #nav .ui-btn-active{ background-image:url(/wap/shop/images/nav_active.png); background-repeat:no-repeat; background-position:center bottom; background-size:contin;}
	#mypage .ui-footer{ background:#fff;}
	
	.safeguard { margin: 10px 0; padding-left: 40px;  overflow: hidden;}
	.safeguard div{float:left; margin-right:10px;display:flex;align-items:center;margin: 0 10px 5px 0;}
	.safeguard div:nth-child(3){align-items:flex-start;margin-bottom:0;}
	.safeguard img{height: 15px; margin-right:5px; width: 15px;}
	
	.price_footer{ overflow:hidden; padding:3px 10px 0;}
	.price_footer .all_price{ float:left;}
	.price_footer span{ float:left; width:40px; text-align:left; color:#8e8e8e; font-size:12px; font-weight:normal; line-height: 32px;}
	.price_footer .all_price .num{ float:left;}
	.price_footer .all_count{ float:right;}
	.price_footer .all_count div{ float:left; line-height: 32px;}
	.details_footer{ padding-top:5px;}
	
	.suspension_icon{ position:fixed; bottom:85px; right:10px; width:40px; z-index:99;}
	.suspension_icon div{ margin-bottom:10px;}
	.suspension_icon div img{ width:40px;}
	.suspension_icon div.more{ position:relative; display:none;}
	.suspension_icon .more .home{ position:absolute; top:-50px; left:0;}
	.suspension_icon .more .me{ position:absolute; top:-20px; left:0;}
	.suspension_icon .more .search{ position:absolute; top:25px; left:0;}
	
	.productcommodityDesc{ display:none; background:#fff; position:relative;}
	.productcommodityDesc .header{ padding:0; width:100%; background:#fff; border-top:1px solid #e0e0e0; border-bottom:1px solid #e0e0e0; border-radius:0;}
	.productcommodityDesc .header li{ width:50%; position:relative;}
	.productcommodityDesc .header li::after{ content:""; width:1px; height:18px; position:absolute; top:50%; margin-top:-9px; right:0; background:#e0e0e0;}
	.productcommodityDesc .header li.active::before{ content:""; width:80%; height:2px; background:#f9384d; position:absolute; bottom:-1px; left:10%; z-index:2;}
	.productcommodityDesc .header li:last-child::after{ display:none;}
	.productcommodityDesc .header li a{ border:none; background:none!important; padding:10px 0;}
	.productcommodityDesc .header li.active a{ color:#f9384d;}
	.productcommodityDesc .fixedhead{ position:fixed!important; top:0; left:0; width:100%;}
	.productcommodityDesc .productcommodity{ padding:5px; min-height:100px; padding-top:46px;}
	.productcommodityDesc .productcommodity img{ width:100%;}
	#productcommoditytabs{ position:absolute; left:0; top:0; width:100%;}
	.details_footer li{width:100%;}
	.packcontent{border-bottom: 1px solid #f5f5f5;}
	.packcontent .packname{padding: 10px 5px;}
	.privilege_box ul{padding:0!important;}
	.privilege_box ul li{display:flex;align-items:center;    background: url(images/usercenter_righticon2.png) no-repeat 99% center;
    background-size: 20px 25px; padding: 10px!important;}
	.dqcountdown span{width:10px;height:10px;border-radius:3px;background:#b6194c;color:#fff;margin:0 2px;padding:0 1px;}
	.privilege_box ul li div{color: #f9384d;}
	.privilege_box ul li span{
        font-weight: normal;
        font-size: 12px;
        background:#f9384d;
        padding:4px 2px;
        text-align: center;
        width:40px;
    }
    .XLDiscount p{
        display: inline-block;
        color: #999;
        font-size:12px;
    }
	.privilege_box ul{border-bottom: 1px solid #f5f5f5;}
	.privilege_box{margin-bottom:0px;}
	.privilege_box ul{border-top: none;}
	#mypage .ui-footer{padding:0;}
	.price_footer span{width:30px;font-size:13px;}
	.price_footer{padding: 0px 10px 0;height: 30px;}
	.price_footer .all_count{float:left;}
	.details_footer td{padding-left:10px;width: 120px;}
	#mypage .details_footer li:first-child a{background: #f9384d;}
	.details_footer{padding:0;}
	#mypage .details_footer li .offline{background:#a5a5a5!important;color:#fff;}
	.details_footer td.opt:nth-child(1){width: 30px;}
	.details_footer td.opt:nth-child(3){width: 30px;}
	.details_footer td.opt .cart_posi{
        left:50%;
        top:1px;
        width: 15px;
        height: 15px;
        text-align: center;    
        padding:0;
    }
    .details_footer td.opt:nth-child(1){width:18%!important;float: left;padding: 0;margin: 0;}
    .details_footer td.opt:nth-child(2){width:18%!important;float: left;padding: 0;margin: 0;}
    .details_footer td.opt:nth-child(3){width:18%!important;text-align: center;float: left;padding: 0;margin: 0;}
    .details_footer td.btn{width:45%!important;float:right;}
    .details_footer td span{width:100%;text-align: center;}
    .details_footer td img{
        width: 17px;
        height: 17px;
        margin-bottom: 3px;
        margin-right: 2px;
    }
    .opt a{
        text-align: center;
        font-weight: normal!important;
        color: #666!important;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 11px;
        padding:5px 0 2px;
    }
    .details_footer td.opt{margin:0 5px;}
    .packcontent .packc{border-bottom:none;}
    .details_box table td:nth-child(2n+1){padding-left:5px;}
    .details_box{border-bottom: 1px solid #f5f5f5;}
    .evaluate_box{border-top: 1px solid #eee;border-bottom: 1px solid #eee;}
    .details_box table td ul{overflow: hidden;}
    .otherpor_box li .golook{
        width:30px;
        float: right;   
        margin-right: 4px; 
    }
    .moredetails_box{padding: 0px 0 50px;}
    .details_box table td li:last-child{margin-bottom:2px;}
    .gotop{
        width: 35px;
        height: 35px;
        position: fixed;
        bottom: 60px;
        right: 10px;
        background: #4b4b4b;
        opacity: 0.6;
        text-align: center;
        border-radius: 50%;
        border: 1px solid #000;    
        display:none;
    }
    .gotop img{
        width:23px;
        margin-top:5px;
    }
    .otherpor_box li p{font-size:13px;}
    .otherpor_box li div span i{font-style: normal;font-size: 10px;margin-right:2px;}
    .details_footer ul{background: #f9384d;}
    .details_footer ul li{background: #f9384d;}
    #mypage .ui-footer{ border-left: none;border-right:none;border-top:1px solid #f5f5f5;}
    .dayfavorable_div{
        font-size: 13px;
        overflow: hidden;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 5px;    
    }
    .XLDiscount{position:relative;}
    .XLDiscount div{width:-webkit-calc( 100% - 115px )!important;}
    .otherpor_box li div span{margin:0;}
    .details_box .desc{margin:2px 0}
    .details_box h2{margin-top:1px;}
    .banner1 .productTime{position: absolute;left: 0;bottom: -2px;height:40px;width: 100%;background:url(images/producttime.jpg?v=x) 0 0 no-repeat;z-index:100;background-size:88% 100%;}
    .banner1 .productTime>div{width:48%;height: 100%;background: url(images/producttimestate.png?v=x) no-repeat 0 0 /100%;float: right;background-size: 100% 100%; display: flex;
    justify-content: center;align-items: center;color: #b6194c; font-size: 12px;flex-wrap: wrap; padding-left: 28px;box-sizing: border-box;}
     .banner1 .productTime>div .stateTime{display:block;}
    .u-flyer{
  display: block;width: 30px;height:30px;border-radius: 50px;position: fixed;z-index: 9999;}
  div[prop="Data.MyShortDescTag"] span{border-radius:2px;background: #ffffff;color: #ff6800;padding: 2px;font-size: 11px;margin-right:2px;margin-top: 5px;border: 1px solid #ff6800;}
  div[prop="Data.MyShortDescTag"] span.dibiao{color:#ff8e00;border: 1px solid #ff8e00;}
  div[prop="Data.MyShortDescTag"] span.baoyou{color:#fd2424;border:1px solid #fd2424;}
  div[prop="Data.MyShortDescTag"] span.youji{color:#0daa0d;border:1px solid #0daa0d;}
  .privilege_box ul li.FoldDiscount .PromotionContent{border:none;margin-right:10px;}
  .FoldDiscountContent{
      background: #f9f9f9;
    padding-left:45px;
    width: 100%;
    box-sizing: border-box;
    color: #666;
    font-size: 12px;
  }
  .privilege_box ul .FoldDiscount div{width: 95%!important; display: flex;align-items: center;}
    .privilege_box ul li.FoldDiscount p{width: calc(100% - 140px);color: #f9384d;float:left;line-height: 20px;}
    .privilege_box ul li.FoldDiscount .xiangliang{text-align: right;
    width: 80px!important;
    background: #fff!important;
    margin: 0;color:#999;float:right;}
   .privilege_box ul .XLDiscount .coupon{color: #fff;background:#f9384d;}
  .XLDiscount .PromotionContent{border: 1px solid #f9384d;color:#fff;margin:0;}
  
  .video-box .layui-m-layercont { padding: 0; }
  .video-box video { width: 100%; }
    
    .dqcountdown span {
        background: #e00909;
    }

    .video-container {
        position: relative;
        z-index: 1;
        display: block;
        height: 0;
        padding: 0;
        overflow: hidden;
        background-size: cover;
        padding-bottom: 100%;
        overflow: hidden;
    }

    .video-container .bg-blur {
        z-index: 2;
        float: left;
        width: 100%;
        padding-bottom: 100%;
    }

    .video-container video {
        z-index: 5;
        position: absolute;
        top: 50%;
        bottom: 0;
        left: 0;
        width: 100%;
        /* transform: translateY(-50%); */
        
        -webkit-transform: translate3d(0, -50%, 0);
        -moz-transform: translate3d(0, -50%, 0);
        -ms-transform: translate3d(0, -50%, 0);
        transform: translate3d(0, -50%, 0);

        border: 0;
        background: #333;
        display: none;
    }

    .video-container .cover {
        position: absolute;
        z-index: 4;
        left: 0;
        top: 50%;
        width: 100%;
        transform: translateY(-50%);
        border: 0;
    }

    .video-container .icon {
        position: absolute;
        z-index: 5;
        top: 50%;
        left: 50%;
        width: 20%;
        transform: translate(-50%, -50%);
        border: 0;
    }

    .video-container span {
        z-index: 3;
        position: absolute;
        color: #fff;
        left: 0;
        bottom: 15px;
        right: 0;
        width: 100px;
        text-align: center;
        display: block;
        margin: auto;
        background-color: rgba(0,0,0,.6);
        padding: 5px 0;
        border-radius: 15px;
    }

    </style>

<%--    
    <script type="text/javascript">
        shareUrl = location.href; //分享链接
        shareTitle = '商品详情'; //分享标题
        shareLogo = '<%=ServerUtil.GetRootURI() %>/wap/shop/images/logo.png'; //分享图标
        shareDesc = '<%= ParamKit.GetValue("SystemConfig", "Desciption", "&nbsp") %>'; //分享描述
    </script>
--%>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="pages" runat="server">
    <!--S page -->
<div data-role="page" class="loaderHandler" id="mypage">

	<!--S header -->
	<div data-role="header">
	</div>
    <!--E header -->
	
    <!--S content -->
	<div role="main" class="ui-content ">


        <!--banner start-->
        <!--banner_list start-->
        <div class="banner1" style="position:relative;">
<!--             <div class="productTime" onclick="_hmt.push(['_trackEvent', 'product|null|dianqingrukou|0|0', 'click', 'product']);window.location.href='http://dzp17.gdtvshop.weixinmvp.com/'">
                <div>
                    <span class="stateTime" style="color: #f9384d">距离双十一开始还有</span>
                    <div id="mycount" ><div class="dqcountdown" style="color: #f9384d"></div></div></li>
                </div>
            </div> -->
          <div class="slider3" prop="ImageList"></div>
          <span class="bx-wrapper-bg">右滑加载详情</span>
          <img id="PRODUCT_IMAGE_TOP" src="images/producttime.jpg" style="position: absolute;top: 0;right: 30px;width: 52px;display:none;z-index:99999">
        </div>

        <img id="PRODUCT_IMAGE_BOTTOM" src="" alt="" style="width: 100%;display:none;">

          <div class="countdown" style="display: none;padding: 5px;background-color: #f9384d;color: #fff;border-radius: 0;"></div>
        <!--s details_box-->
        <div class="details_box">
        	<div class="title" >
                <img id="RODUCT_NAME_BEFORE" src="" style="border-radius: 3px; height: 20px;vertical-align: middle; display:none;">
                <span prop="Data.ProductName" style="vertical-align: middle;"></span>   
            </div>
        	<div class="desc" prop="Data.ShortDesc"></div>
            <div prop="Data.MyShortDescTag" style="height: 20px;margin-top: 5px;display:none;"></div>
            <h2>
                <i>￥</i><font prop="Data.SalePrice" id="salePrice"></font>
                <del prop="Data.MarketPrice" style="color: #999; margin-left:5px; display:none" id="MarketPrice"></del>
                <em id="storageTips" style="display:none">（库存有限）</em>
                <span>已售<font prop="SellCount" id="sellcount"></font>件</span>
<%--                <span>剩余<font prop="Data.Storage" id="storage"></font>件，</span>--%>
            </h2>
            <!-- <div class="countdown" style="color: #999; font-size:12px"></div> -->
        </div>
        <!--e details_box--> 
                
        <!--s details_box-->
        <!--e details_box-->    
        <div class="privilege_box" id='promotionlist'>
        <input type="hidden"  prop="Data.TagIds" value=""/>
            <ul>
               <%-- <li>
                    <span>满减</span>
                    <div>指定商品满¥88，立减¥22</div>
                </li>
                <li>
                    <span>满赠</span>
                    <div>
                        <p>指定商品满¥88,可赠以下任一商品可赠以下任一商品可赠以下任一商品</p>
                    </div>
                </li>--%>
            </ul>
        </div>
        <div class="details_box" id="skucontent" style="display:none;padding:0;">
          	  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="skuHandler">

              </table>

<%--			<ul class="details_btn" style="display:none">
            	<li>
            	<a href="javascript:void(0);" data-ajax="false" id="chatroomhref" data-role="button" data-mini="true"><img src="images/prodetails_btn1.png">在线咨询</a>
                </li>
                <li >
                <a href="javascript:void(0);" onclick="addFavorite(this)" data-role="button" data-mini="true" ><img src="images/prodetails_btn2.png">收藏商品</a>
                </li>
            </ul>--%>

        </div>  
        
        <div class="packcontent" id="packcontent" style="display:none">
            <div class="packname">物流</div>
            <div class="packc" prop="Data.PackContent">-</div>
        </div>
            
        <div class="packcontent" id="giftcontent" style="display:none">
            <div class="packname">服务</div>
            <div class="packc" prop="Data.GiftContent">-</div>
        </div>

        <div class="packcontent" style="border-bottom: 1px solid #f5f5f5;">
            <div class="safeguard">
                <div><img src="images/safe_zp.png" />正品保证</div>
                <div><img src="images/safe_kf.png" />售后无忧</div>
                <div><img src="images/safe_shipping.png" />全场包邮(限广东),部分商品享受全国包邮(除港澳台及偏远地区)</div>
            </div>
        </div>
        

        <div style="height: 10px;">&nbsp;</div>

        

        <div class="evaluate_box">
            <div class="allcomm">
            <span style="color: #999999;">加载中...</span>
            <p></p> 
                     
            </div>
            <div class="grade_box">
            </div>
        </div>

        <div class="otherpor_box" style="display:none">
            <h5>推荐商品</h5>
            <ul class="one-pai">
            </ul>
            <ul class="two-pai">
            </ul>
        </div>

<%--           <div class="search_merchant">
            <div><img src="images/merchantLogo.png" /><p>荷沃士/Wholy Worth</p><span>搜索该品牌</span></div>
        </div>--%>

        <%--<div class="imgTxt_box"><a data-ajax="false" href="/wap/shop/ProductCommodity.aspx?no=<%=Request["no"] %>">
            <p><img src="images/ImgTxtDetail.png" /> <span>查看更多图文详情</span></p>
            </a>
        </div>--%>

        <div class="moredetails_box">
            <div class="moredetails">
                <p class="clicksee">点击查看商品详情</p>
            </div>
            <div class="productcommodityDesc">
                <div data-role="tabs" id="productcommoditytabs">
                  <div data-role="navbar">
                    <ul class="header">
                      <li class="active commoditydesc"><a href="#one" data-ajax="false">商品详情</a></li>
                      <li class="commodityparam"><a href="#two" data-ajax="false">规格参数</a></li>
                    </ul>
                  </div>
                </div>
                <div class="main productcommodity">
                    
                </div>
            </div>
        </div>

<%--        <div class="suspension_icon">
            <div><img src="images/icon_03.png" /></div>
            <div class="more"><img class="close" src="images/icon_18.png" />

            <a data-role="none"  href="/Wap/Shop/Default.aspx" data-ajax="false" ><img class="home" src="images/icon_08.png" /></a>
            <a data-role="none" href="/wap/Shop/MemberDefault.aspx" data-ajax="false"><img class="me" src="images/icon_10.png" /></a>
            <a data-role="none"  href="/Wap/Shop/ProductList.aspx" data-ajax="false" ><img class="search" src="images/icon_12.png" /></a></div>

            <div><a href="/Wap/Shop/KFList.aspx" data-ajax="false" data-role="none"><img src="images/icon_06.png" /></a></div>
        </div>--%>
 	</div>
    <!--E content -->
	
    <!--S footer -->
	<div data-role="footer" data-position="fixed" data-tap-toggle="false" data-theme="g">
    	<div class="details_footer">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
          <tr style="display:block;width:100%;height:100%;">
            <td class="opt">
                <a href="/Wap/Shop/KFList.aspx" data-ajax="false"><span><img src="images/kefu_02.png"></span><span>客服</span></a>
            </td>
            <td class="opt">
                <a href="/Wap/Shop/Default.aspx" data-ajax="false"><span><img src="images/shopHome2.png"></span><span>首页</span></a>
            </td>
            <td class="opt shopCartContainer" style="padding-left:0;">
                <a href="/Wap/ShoppingCart/" data-ajax="false"><span><img src="images/shopcar.png"></span><span>购物车</span>
                <div class="cart_posi" style="visibility:hidden;"></div>
                </a>
            </td>
            <td  class="all_price" style="padding-left:0px;width:115px;display:none;">
                <div class="num"><a href="javascript:void(0);" id="min1" onclick="increaseNumber(-1)">-</a><input type="text" value="1" name="numBox" id="text_box1" onblur="setNumber()" /><a href="#" id="add1" onclick="increaseNumber(1)">+</a></div>
            </td>
            <td class="btn" style="padding-left: 0;font-size:15px;height:100%;">
            	<ul id="toolbar" style="display:none;height:100%;">
                	<li id="bt_buynow"><a href="javascript:void(0);">加入购物车&nbsp;</a></li>
                    <%--<li id="bt_addcart"><a href="javascript:void(0);">加入购物车</a></li>--%>
                </ul>
            </td>
          </tr>
        </table>

        </div>
    </div>
    <a href="javascript:void(0);" class="gotop" onclick="gotop()"><img src="images/sxtop_icon2.png"></a>
    <%-- 悬浮图标 <a href="https://cms.weixinmvp.com/Mass/170420dianqing/" onclick="_hmt.push(['_trackEvent', 'product|null|miaosharukou|0|0', 'click', 'product']);" id="gokill"><img src="images/killrukou.png"></a>--%>
    <!--E footer -->

<%--    <div data-role="popup" id="shoppingDialog" data-overlay-theme="a" data-theme="a" data-dismissible="false" style="max-width:500px; box-shadow: 0 0 8px rgba(0,0,20,0.2);">
        <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right optionCancel">Close</a>
        <div role="main" class="ui-content">
            <div class="ui-title ui-bar"  style="font-size:14px;margin-top:5px; color:#333;" align="center">
                加入购物袋成功！</div>
            <div class="btn" style=" background:none; margin:0 1em;">
                <a  href="#" data-rel="back" data-ajax="false" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-j buy buybtn">
                    继续购物</a> 
                <a href="javascript:void(0)" onclick="closeAndJump()" data-ajax="false" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-k jiesuan buybtn2">
                    去结算</a>
            </div>
        </div>
    </div>
--%>
</div>
<!--E page -->

<div data-role="page" id="remarkPage" data-overlay-theme="a" data-theme="a">
    <div role="main" class="ui-content">
        <div class="ui-title ui-bar"  style="font-size:16px;margin-top:5px; color:#333;" align="center" id="remarkTitle">
            请填写商品备注信息！</div>                
        <form id="remarkForm" style="margin: 1em;">
                
        </form>

        <div class="btn" style=" background:none; margin:0 1em; text-align: center;">
            <a href="javascript:void(0)" onclick="summitDataWithRemark($('#remarkForm'))" data-ajax="false" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-j buy" style=" font-weight:normal; padding:10px 15px;">
                立即购买</a> 
            <a href="#mypage" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-k jiesuan" style=" font-weight:normal; padding:10px 15px; margin-right:0;">
                返回</a>
        </div>
    </div>
</div>
  

<!--S page -->
<div data-role="page" class="loaderHandler ProductComment" id="commentPage" style="background-color: #fafafa;">

	<!--S header -->
	<div data-role="header">
	</div>
    <!--E header -->
	
    <!--S content -->
	<div role="main" class="ui-content">
          <div data-role="navbar">
            <div class="headerbtn">
            <a href="#mypage" ><img src="images/arrowLeftCom.png" /></a></div>
            <ul class="header">
              <li class="active"><a href="javascript:void(0)" onclick="loadCommentList(0)" data-ajax="false">
                <p style="font-size: 16px; font-family: 微软雅黑;">全部（<font id='counter0'></font>）</p>
              <%--  <p>（<font id='counter0'></font>）</p> --%>
                </a></li>
              <li><a  href="javascript:void(0)" onclick="loadCommentList(1)" data-ajax="false">
                <p style="font-size: 16px; font-family: 微软雅黑;">有图（<font id='counter1'></font>）</p>
                </a></li>
              <%--  <li><a  href="javascript:void(0)" onclick="loadCommentList(4,5)" data-ajax="false">
                <p>好评</p>
                <p>（<font id='counter1'></font>）</p>
                </a></li>
              <li ><a  href="javascript:void(0)" onclick="loadCommentList(2,3)" data-ajax="false">
                <p>中评</p>
                <p>（<font id='counter2'></font>）</p>
                </a></li>
              <li><a  href="javascript:void(0)" onclick="loadCommentList(1,1)" data-ajax="false">
                <p>差评</p>
                <p>（<font id='counter3'></font>）</p>
                </a></li> --%>
            </ul>
          </div>

        <div class="content">
        </div>
        <div style="display:none">
                <button id="btnMore" style="width: 95%; margin-left: auto; margin-right: auto;" class="ui-btn ui-mini ui-icon-refresh ui-btn-icon-left">显示更多</button></div>
    </div>
    <!--E content -->
	
</div>

<script src="js/skuHandler.js" type="text/javascript"></script>
<script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
<script src="/wap/lib/common/loaderHandler.js" type="text/javascript"></script>
<script src="/wap/lib/easydialog/easydialog.min.js" type="text/javascript"></script>
<script src="js/clamp.min.js"></script>
<script src="../lib/jquery-countdown/dist/jquery.countdown.min.js" type="text/javascript"></script>
<script>
var myProductCount = <%=ProductTotalCount %>;
var ProductNos = '<%=Request["no"]%>';
</script>
<script type="text/javascript">
    var WinTop = 0;
    $(document).ready(function(){
        $.cookie('After',$.cookie('CurrentPage'));
        $.cookie('CurrentPage','prductdetail');
        var After = $.cookie('After');
        var Current = $.cookie('CurrentPage');
        //保存统计记录
        var path ='prductdetail|path|'+Current + '|' + After;
        _hmt.push(['_trackEvent', path, 'enter', 'prductdetail']);
        _hmt.push(['_trackEvent', 'page', 'view', 'prductdetail']);
        _hmt.push(['_trackEvent', 'product', 'view', '<%=Request["no"]%>']);
        if(myProductCount){
            $('.cart_posi').html(myProductCount).css("visibility","visible");
        };
        $(window).scroll(function () {
            WinTop = $(window).scrollTop();
            if(WinTop>700){
                $('.gotop').show();
            }else{
                $('.gotop').hide();
            };
        });
       // 双十一倒计时
       // var countDownTime = '2017/11/1 00:00:00';
       // $('div.dqcountdown').unbind().countdown(countDownTime).on('update.countdown', function (event) {
       //     var $this = $(this).html(event.strftime('<span>%D</span>天<span>%H</span>时<span>%M</span>分<span>%S</span>秒'));
       // }).on('finish.countdown', function () {
       //     var countDownTime = '2017/11/12 00:00:00';
       //     $('.productTime .stateTime').html('距离双十一结束还有');
       //     $('div.dqcountdown').unbind().countdown(countDownTime).on('update.countdown', function (event) {
       //     var $this = $(this).html(event.strftime('<span>%D</span>天<span>%H</span>时<span>%M</span>分<span>%S</span>秒'));
       //     }).on('finish.countdown', function () {
       //         $('.productTime').hide();
       //     });
       // })
   });

    function gotop(){
        $('body,html').animate({scrollTop:0},200)
    };
    function commitShowTips(config) {
        $.mobile.changePage( "#remarkPage", {
          changeHash: false
        });

        return;
	}
    //推荐请求tianjia
	function TjProduct(){
        $.ajax({
		    type: "post",
		    url: "<%= ZLCMS.Business.Util.RedisCache.GetStringValue("SYS_CFG#CMS_SERVICE_IP","") %>/api/Product/GetReferenceProductList",
		    data: {
			    "ReferenceKind": "PRODUCT_TJ",
			    "ReferenceCode": "<%=Request["no"] %>",
			    "PageIndex": 1,
			    "PageSize": 90
		    },
		    success:function(result){
			    var resultList = result.Data;
//			    var ProductName = resultList.ProductName
                 var similarTemp='<li>' +
                    '<div class="otherporimg"><img src="{ProductImage}" /></div>' +
                    '<p class="dayfavorable_title">{ProductName}</p>' +
                    '<div class="dayfavorable_div">' +
                        '<span><i>¥</i>{SalePrice}</span>' +
                    '</div>' +
                '</li>';
                
                $(result.Data).each(function(index){
                	this.ProductImage = firstThumbnail(this.ProductImage);
                	var li = $(similarTemp.format(this));
                	var ProductNo = this.ProductNo;
                	var Pro_src = "/Wap/Shop/ProductDetail.aspx?no="+ProductNo;
                	 $('.otherpor_box .one-pai').append(li);
                	li.click(function(){
                		_hmt.push(['_trackEvent', 'ProductDetail|TjProduct|' + index, 'click', ProductNo]);
                		window.location.href = Pro_src;
                	});
                });
                $('.otherporimg').height($('.otherporimg').width());
		    }
	    });
    }
    

    //当前选中的商品
    var choosedProduct = null;
    var productDetail = null;
//    var productInfo = null;

    function initializePage() {
        var handler = $('.loaderHandler').loaderHandler();
        handler.initialize({
            command: 'Pub.LoadProductDetail',
            parameter: { ProductNo: '<%=Request["no"]%>', MemberAccount: '<%=CurrentMemberAccount %>' },
            beforeHandleResult: function (result, totalCount, container) {
                productDetail = result;
                //设置产品标签
                productDetail.MyShortDescTag="";
                var ShortDescTagArray =[];
                if(productDetail.Data.ShortDescTag != null && productDetail.Data.ShortDescTag != ''){
                    ShortDescTagArray = productDetail.Data.ShortDescTag.split(',');
                    $(ShortDescTagArray).each(function(index){
                         switch (ShortDescTagArray[index]) {
                            case "全国包邮":productDetail.MyShortDescTag += '<span class="baoyou">全国包邮</span>';break;
                            case "地标":productDetail.MyShortDescTag += '<span class="dibiao">地标产品</span>';break;
                                case "有机认证":productDetail.MyShortDescTag += '<span class="youji">有机认证</span>';break;
                            case "":break;
                            default:productDetail.MyShortDescTag +='<span>'+this+'</span>';break;
                        }
                    });
                    $('div[ prop="Data.MyShortDescTag"]').html(productDetail.MyShortDescTag).show();
                }


                $.ajax({
                    url: '<%= ZLCMS.Business.Util.RedisCache.GetStringValue("SYS_CFG#CMS_SERVICE_IP","") %>/api/Product/GetRefrenceProductTag',
                    type: 'post',
                    dataType: 'json',
                    data: {
                        'ProductNo': '<%=Request["no"]%>',
                    },
                    success: function (res) {
                        
                        try {

                            var getSrc = function (jsonString) {
                                var src = '';
                                try {
                                    var _tmp = $.parseJSON(jsonString)[0];
                                    src = (_tmp.ServerUrl ? _tmp.ServerUrl : '') + _tmp.FilePath + '.thumb.' + _tmp.FileExt;
                                } catch (e) {
                                    src = '';
                                }
                                return src;
                            };

                            (function (PRODUCT_DESC_AFTER) {
                                result.Data.ShortDesc += PRODUCT_DESC_AFTER.map(function (item) { return item.CONTENT; }).join('');
                                $('div[ prop="Data.ShortDesc"]').html(result.Data.ShortDesc).show();
                            })(res.Data.PRODUCT_DESC_AFTER);


                            (function (RODUCT_NAME_BEFORE) {
                                if (!RODUCT_NAME_BEFORE[0]) return ;
                                var src = getSrc(RODUCT_NAME_BEFORE[0].IMAGE_URL);
                                if (src) {
                                    $('#RODUCT_NAME_BEFORE').attr('src', src).show();
                                }

                            })(res.Data.RODUCT_NAME_BEFORE);

                            (function (PRODUCT_IMAGE_BOTTOM) {
                                if (!PRODUCT_IMAGE_BOTTOM[0]) return ;
                                var src = getSrc(PRODUCT_IMAGE_BOTTOM[0].IMAGE_URL);
                                if (src) {
                                    $('#PRODUCT_IMAGE_BOTTOM').attr('src', src).show();
                                }

                            })(res.Data.PRODUCT_IMAGE_BOTTOM);

                            (function (PRODUCT_IMAGE_TOP) {
                                if (!PRODUCT_IMAGE_TOP[0]) return ;
                                var src = getSrc(PRODUCT_IMAGE_TOP[0].IMAGE_URL);
                                if (src) {
                                    $('#PRODUCT_IMAGE_TOP').attr('src', src).show();
                                }

                            })(res.Data.PRODUCT_IMAGE_TOP);

                        } catch (error) {
                            
                        }

                    }
                });
                


            },
            afterHandleResult: function (result, totalCount, container){
                //设置同类商品
                if(result.SimilarProducts.length>0)$('.otherpor_box').show();
//              $('.otherpor_box ul').empty();//清空
				//tianjia
                var similarTemp='<li onclick="location.href=\'/Wap/Shop/ProductDetail.aspx?no={ProductNo}\'">' +
                    '<div class="otherporimg"><img src="{ThumbnailImg}" /></div>' +
                    '<p class="dayfavorable_title">{ProductName}</p>' +
                    '<div class="dayfavorable_div">' +
                        '<span><i>¥</i>{SalePrice}</span>' +
                    '</div>' +
                '</li>';
                $(result.SimilarProducts).each(function(index){
                    this.ThumbnailImg = firstThumbnail(this.ThumbnailImg);
                	var li = $(similarTemp.format(this));
                	var ProductNo = this.ProductNo;
                	var Pro_src = "/Wap/Shop/ProductDetail.aspx?no=" + ProductNo;
                	 $('.otherpor_box .one-pai').append(li);
                	li.click(function(){
                		_hmt.push(['_trackEvent', 'ProductDetail|TjProduct|' + index, 'click', ProductNo]);
                		window.location.href = Pro_src;
                	});
                });
                
                TjProduct();
                var glist =$.parseJSON(result.CustomField);
                
                if(glist != null && glist.length >0){
                    $(glist).each(function(){
                        if(this.Items.length>1){
                            $("#skucontent").css({padding:'5px 10px'}).show();
                        };
                    });
                }
                 //sku信息初始化
                         $('.skuHandler').skuHandler(
                        {
                            //产品列表
                            plist:result.SkuList,
                            //分组列表
                            glist: glist,                                 
                            //分组模板
                            groupTemplate:'<tr group={id}><td>{name}</td><td><ul>{itemlist}</ul></td></tr>',
                            //项模板
                            itemTemplate:'<li><a item={id} href="javascript:void(0);">{name}</a></li>',
                            //项激活class
                            activeClass:'active',
                            //项不可用class
                            unvalidClass:'unvalid', 
                            //取消选中
                            unselectProduct: function () {
                                choosedProduct=null;
                                
                                if(result.MinSalePrice == result.MaxSalePrice)
                                {
                                  $('#salePrice').text(result.MaxSalePrice);
                                }
                                else if (result.MinSalePrice&&result.MaxSalePrice&&result.MinSalePrice!=result.MaxSalePrice) {
                                    $('#salePrice').text(result.MinSalePrice+"~"+result.MaxSalePrice);
                                }
                                else{
                                       $('#salePrice').text(productDetail.SalePrice);
                                }
                                	$('#MarketPrice').hide();
                            }, 
                                                          
                            //选中商品
                            selectProduct: function (product) {
                                choosedProduct = product;
                                $('#salePrice').text(product.SalePrice);
                                $('#MarketPrice').text(product.MarketPrice);
                                $('#storage').text(product.Storage);
                                $('#storageTips').text('（仅剩' + product.Storage + '件）');
                                if(product.SalePrice < product.MarketPrice){
                                    $('#MarketPrice').show();
                                }else{
                                	$('#MarketPrice').hide();
                                }
                                //SKU售罄 
                            shopChutwo(result,product);                
                            
                           }
                                                       
                        });      
                //处理标题
                document.title = result.Data.ProductName;
                if(result.IsSpecialOffer == null) result.IsSpecialOffer = '';

                //处理特殊供货标识：XL-限量
                if(result.IsSpecialOffer.indexOf('XL')>=0){
                    $("#storageTips").show()
                }

                //物流提示
                if(result.Data.PackContent != null && result.Data.PackContent != undefined && result.Data.PackContent != ''){
                    $("#packcontent").show()
                }

                //服务提示
                if(result.Data.GiftContent != null && result.Data.GiftContent != undefined && result.Data.GiftContent != ''){
                    $("#giftcontent").show();
                }

                if (result.SkuList.length > 1) {
                    $('#MarketPrice').hide();
                }
                /**
                //判断市场价和销售价是否相同
                if(result.Data.SalePrice != result.Data.MarketPrice){
                     $('#MarketPrice').show();
                }
                else{
                     $('#MarketPrice').hide();
                }
                */

                //设置分享
                shareTitle = result.Data.ProductName;
                try{
                    var shaerLogoUrl = firstFilePath(result.Data.ThumbnailImg);
                    if(shaerLogoUrl.indexOf("http") == 0){
                        shareLogo = shaerLogoUrl+'.thumb.jpg';
                    }
                    else{
                        shareLogo = '<%=ServerUtil.GetRootURI() %>' + shaerLogoUrl+'.thumb.jpg';
                    }
                }catch(e){}
                shareDesc = result.Data.ShortDesc;

                if(window.wx){
                wx.onMenuShareTimeline({
                    title: shareTitle, // 分享标题
                    link: shareUrl, // 分享链接
                    imgUrl: shareLogo, // 分享图标
                    success: function () {
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () {
                        // 用户取消分享后执行的回调函数
                    }
                });
                wx.onMenuShareAppMessage({
                    title: shareTitle, // 分享标题
                    desc: shareDesc, // 分享描述
                    link: shareUrl, // 分享链接
                    imgUrl: shareLogo, // 分享图标
                    success: function () {
                        // 用户确认分享后执行的回调函数
                    },
                    cancel: function () {
                        // 用户取消分享后执行的回调函数
                    }
                });
                }
                 
                    //判断处理各种状态        
                  shopChutwo(result);

                if(result.MinSalePrice == result.MaxSalePrice)
                {
                  $('#salePrice').text(result.MaxSalePrice);
                }
                //显示价格区间
                 else if (result.MinSalePrice&&result.MaxSalePrice&&result.MinSalePrice!=result.MaxSalePrice) {
                    $('#salePrice').text(result.MinSalePrice+"~"+result.MaxSalePrice);
                 }
                 else{
                    $('#salePrice').text(productDetail.SalePrice);
                 }

                //处理备注信息
                if(result.Data.RemarkConfig)
                {
                    var configJson =  $.parseJSON(result.Data.RemarkConfig);
                    $('#remarkTitle').text(configJson.Title);
                    displayForm($('#remarkForm'), configJson.Field);
                }

                //处理商品咨询
                if(result.ChatRoomLink){
                    $('#chatroomhref').show();
                    $('#chatroomhref').attr("href", result.ChatRoomLink);
                }
                
                //评论信息--打开栏目再加载
                loadCommentList(0);
                
                //店铺信息 
                loadStoreInfo();
                //优惠信息
                //LoadPromotionList();
                //评论信息
                if(result.CommentCount == 0) {
                $('.evaluate_box>.allcomm>span').text('暂无评论');
                $('.evaluate_box>.grade_box').hide();
                }else{
                $('.evaluate_box>.grade_box').show();
                $('.evaluate_box > .allcomm > p').click(function(){
                    $.mobile.changePage( "#commentPage",{transition : 'none'});
                    
                    $(window).scroll(function () {
                        //当内容滚动到底部时加载新的内容
                        if($('#commentPage').css('display') == 'block'){
                            if ($(this).scrollTop() + $(window).height() + 20 >= $(document).height() && $(this).scrollTop() > 20) {
                                //当前要加载的页码
                                $('#btnMore').click();
                            }
                        }
                    });
                });
                if(result.CommentCount>999)result.CommentCount='999+';
                $('.evaluate_box>.allcomm>span').text('用户评价('+result.CommentCount +')');
                // $('.evaluate_box>.allcomm>p').html('<em>' + result.GoodCommentRate + '%</em>好评');
                $('.evaluate_box>.allcomm>p').html('查看全部');
                
                var commentTemp = '<div class="grade"><div class="itemallcomm"><span>{MemberName}</span><p style="display: none;">{RecordDate}</p></div><div><p>评分：</p><ul>{ScoreHtml}</ul></div><div>{Content}</div><div class="imgbox">{imgHtml}</div></div>';
                

                $(result.CommentList).each(function(){
                    this.ScoreHtml = '';

                    var i = 0;
                    for(; i<this.Score; i++){
                    this.ScoreHtml +='<li class="active"></li>';
                    }
                    for(; i<5; i++){
                    this.ScoreHtml +='<li></li>';
                    }
                    
                    try {
                        var imgList = $.parseJSON(this.ImageUrl);
                        var ImgHtml = "";
                        if (imgList.length > 0) { ImgHtml = '<ul>'; }
                        $(imgList).each(function () {
                            var src = ($.cookie('imagesvr') ? $.cookie('imagesvr') : '') + this.FilePath + '.thumb.'  + this.FileExt;
                            var srcBig = ($.cookie('imagesvr') ? $.cookie('imagesvr') : '') + this.FilePath;
                            ImgHtml += '<li><img onclick="zoomCommentImg(this)"  src="' + src + '" src-big="' + srcBig + '" /></li>';
                        });
                        if (imgList.length > 0) { ImgHtml += '</ul>'; }
                        this.imgHtml = ImgHtml;
                    } catch (e) {
                        this.imgHtml = "";
                    }
                    this.RecordDate= getMonDayString(this.RecordDate);
                    $('.evaluate_box>.grade_box').append(commentTemp.format(this));
                });
                }                

                $('.otherporimg').height($('.otherporimg').width());
            }
        });
        handler.load();
    }


    function loadStoreInfo()
    {
        var storeid = $('#storebox').text();
        if(!storeid || storeid == 0) return; 

        var handler = $('.store_box').loaderHandler();
        handler.initialize({
            command: 'Pub.LoadStoreInfo',
            parameter: { StoreId: $('#storebox').text() },
            afterHandleResult: function (result, totalCount, container) {
                $("#storename").html(result.StoreInfo.Name);
                $("#storehref").attr("href", result.StoreInfo.HomeUrl);
                $(".store_box").slideDown();
            }
        });
        handler.load();
    }
    


    var getVideoContainer = function (video_src, video_covers) {
        
        var $videoContainer = $('<div class="video-container"><div class="bg-blur"></div><video src="" controls preload x-webkit-airplay="true" webkit-playsinline="" playsinline="true"></video><img class="cover"><img class="icon" src="images/productDetail/bf.png" ><span>结束播放</span></div>');
        
        var $bgBlur = $videoContainer.children('.bg-blur');
        var $video = $videoContainer.children('video');
        var $cover = $videoContainer.children('.cover');
        var $icon = $videoContainer.children('.icon');
        var $span = $videoContainer.children('span');


        
        $bgBlur.css({
            'background-color': '#333',
        })

        $video.attr({
            src: video_src,
            poster: video_covers,
        }).click(function () {
            if ($video.get(0).paused) {
                $video.get(0).play();
            } else {
                $video.get(0).pause();
            }
        })

        $cover.attr({
            src: video_covers,
        }).click(function () {
            $video.show().get(0).play();
            $cover.hide();
            $icon.hide();
        });
        $icon.click(function () {
            $video.show().get(0).play();
            $cover.hide();
            $icon.hide();
        });

        $videoContainer.on('swipe', function () {
            if (!$video.get(0).paused) {
                $video.get(0).pause();
            }
        });

        $span.click(function () {
            if (!$video.get(0).paused) {
                $video.get(0).pause();
            }
            $video.hide();
            $cover.show();
            $icon.show();
        });

        return {
            $el: $videoContainer
        };
    }

    $('[prop=ImageList]').bind('valuechange', function (event, param) {

        var slideTemp = '<div class="slide"><a><img onclick="zoomProdImg(this)" src="' +  ($.cookie('imagesvr') ? $.cookie('imagesvr') : '') + '{FilePath}.thumb.{FileExt}"></a></div>';

        try {
            
            var videoList = JSON.parse(param.handler.loaderresult.Data.Video);

            $.each(videoList, function (index, item) {

                var video_covers = item.CoverImage = (item.CoverImage.ServerUrl || '') + item.CoverImage.FilePath + '.thumb.' + item.CoverImage.FileExt;
                var video_src = item.Video = item.Video = (item.Video.ServerUrl || '') + item.Video.FilePath;

                var $slideDiv = $('<div class="slide"></div>');
                var videoContainer = getVideoContainer(video_src, video_covers);
                var $videoDiv = videoContainer.$el;
                $slideDiv.append($videoDiv);
                $(".slider3").append($slideDiv);
            });

        } catch (error) {
            console.log(error)
        }


        try{
            var picList = $.parseJSON(param.value);
            if (picList.length > 5) {
                picList = picList.slice(0, 5)
            }


            $(picList).each(function () {
               $(".slider3").append(slideTemp.format(this));
            });

            slider = $('.slider3').bxSlider({
                // slideWidth: 250,
                minSlides: 1,
                maxSlides: 1,
                slideMargin: 5,
                // auto: true,
                infiniteLoop: false,
                pagerType: 'short',
                onSlideNext: function($slideElement, oldIndex, newIndex) {

                },
                onSliderLoad: function (currentIndex) {
                    $('.bx-wrapper-bg').show()
                }
                // bx-wrapper-bg
            });
            Num = slider.getSlideCount()

            

            
            $(event.target).triggerHandler('valuechanged', param);
        }
        catch(e){};
        return false;
    });

    $(function () {
        initializePage();
        LoadPromotionDetail();
        $(document).on('getNetworkType',  function (event, param){
        //alert(param.type);
            if(param.type=="wifi"){
                    $('.moredetails').click();
            }
        });
    });

    function increaseNumber(factor) {
        var currentVal = parseInt($("input[name=numBox]").val()) + factor;
        $("input[name=numBox]").val(currentVal);
        setNumber();
    }

    function setNumber() {
        var currentVal = parseInt($("input[name=numBox]").val());
        if (isNaN(currentVal)) currentVal = 1;
        if (currentVal < 1) currentVal = 1;
        if (currentVal > 99) currentVal = 99;
        $("input[name=numBox]").val(currentVal);
	}
    
    //选购商品
    function selectProduct(ui, event) {
        var key = '<%=string.IsNullOrEmpty(CurrentMemberAccount)?"Pub.SelectProduct":"Member.SelectProduct" %>';
        //判断库存是否满足
        if (choosedProduct == null) {
            showTips('请选择产品');
            selectTip();
            return false;
        }

        var counter = $("input[name=numBox]").val();
        if (choosedProduct.Storage < counter) {
            showTips('库存不足');
            return false;
        }

        ui.executeCommand({
            successCallBack: function (result) {
              var offset = $(".cart_posi").offset();

              var flyer = $('<span class="u-flyer" style="color:#666;">+1</span>');
              flyer.fly({
                start: {
                  left: event.pageX,
                  top: event.pageY - window.scrollY
                },
                end: {
                  left: offset.left,
                  top: offset.top - window.scrollY, 
                  width: 10,height:10
                }, 
                speed: 0.6, //越大越快，默认1.2
                //vertex_Rtop: 500, //运动轨迹最高点top值，默认20
                onEnd: function(){
                    $('.cart_posi').html(result.TotalProductCount).css("visibility","visible"); 
                    flyer.remove();
                    $('.shopCartContainer').removeClass('rubberBand animated').addClass('rubberBand animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
                          $(this).removeClass('rubberBand animated');
                        });
                    }
              });

            },
        }, key, { ProductList:[{Increment:counter,Counter:0,ProductSkuCode: choosedProduct.ProductSkuCode}], MemberAccount: '<%=CurrentMemberAccount %>' });
    }
    //立即购买
    function submitOrder(ui) {
        //判断库存是否满足
        if (choosedProduct == null) {
            showTips('请选择产品');
            selectTip();
            return false;
        }

        var counter = $("input[name=numBox]").val();
        if (choosedProduct.Storage < counter) {
            showTips('库存不足');
            return false;
        }

        //弹出备注信息
        var rmConfig = $('.loaderHandler').loaderHandler().loaderresult.Data.RemarkConfig;
        if(rmConfig){
            commitShowTips(rmConfig);
        }
        else
        {
            summitData(ui, '');
        }
    }

    function summitDataWithRemark(ui)
    {        
        ui.trigger("validate");
        if (ui.isValid() == false) {
            return;
        }
        
        var remarkData = '';

        ui.find('[field]').each(function () {
            var field = $.parseJSON($(this).attr('field'));

            if (field.ControlType == 'text' || field.ControlType == 'long_text') {
                remarkData += field.FieldName + "-" + $(this).val() + ",";
            } else if (field.ControlType == 'rbox') {
                $(this).find('input[type=radio]').each(function () {
                    if ($(this).prop('checked') == true) {
                        remarkData += field.FieldName + "-" + $(this).val() + ",";
                        return false;
                    }
                });
            } else if (field.ControlType == 'cbox') {
                $(this).find('input[type=checkbox]').each(function () {
                    if ($(this).prop('checked') == true) {
                        remarkData += field.FieldName + '-[' + $(this).val() + '],';
                    }
                });
            } else if (field.ControlType == 'ddlist') {
                $(this).find('select').each(function () {
                    if ($(this).val() == '-1') {
                        remarkData += field.FieldName + '-[未指定],';
                    } else {
                        remarkData += field.FieldName + '-[' + $(this).val() + '],';
                    }

                });
            }
        });
        
        summitData(ui, remarkData);
    }
    
    function summitData(ui, remark)
    {
        var key = '<%=string.IsNullOrEmpty(CurrentMemberAccount)?"Pub.SelectProduct":"Member.SelectProduct" %>';
       
        var counter = $("input[name=numBox]").val();

        //选购商品
        ui.executeCommand({
            successCallBack: function (result) {
                //var skuList=[choosedProduct.ProductSkuCode];
                location.href = 'ConfirmSelectProduct.aspx?sku=' + encodeURIComponent($.toJSON([choosedProduct.ProductSkuCode]));
//                //确认选购
//                ui.executeCommand({
//                    successCallBack: function (result) {
//                        location.href = 'SubmitOrder.aspx';
//                    },gotoUrl:'/wap/shop/ShoppingCart.aspx'
//                }, 'Member.ConfirmSelectProduct', { MemberAccount: '<%=CurrentMemberAccount %>', SkuCodeList: skuList });
            }
        }, key, { ProductList:[{Increment:0, Counter: counter, ProductSkuCode: choosedProduct.ProductSkuCode, Remark:remark}], MemberAccount: '<%=CurrentMemberAccount %>' });   
    }


    function loadCommentList(HasImag) {
        $('#commentPage ul.header li').removeClass('active');
        if(!HasImag){
            $('#commentPage ul.header li:eq(0)').addClass('active')
        } else {
            $('#commentPage ul.header li:eq(1)').addClass('active')
        };
        // if(scoreMax == 3){$('#commentPage ul.header li:eq(2)').addClass('active')};
        // if(scoreMax == 1){$('#commentPage ul.header li:eq(3)').addClass('active')};
        var handler = $('#commentPage .content').listviewHandler();
        handler.initialize({
            loaderBtn: $('#btnMore'), //加载数据按钮（点击加载下一页）
            emptyHtml: '<div class="evaluate_box evaluate_box_normal">-- 暂无评论 --</div>', //无记录时显示此html
            itemTemplate: '<div class="evaluate_box">' +
                '<div class="allcomm">' +
                    '<span>{MemberName}</span>' +
                    '<p style="display: none;">{RecordDate}</p>' +
                '</div>' +
                '<div>' +
                    '<p>评分：</p>' +
                    '<ul>{ScoreHtml}</ul>' +
                '</div>' +
                '<div>{Content}</div>' +
                '<div>{ImgHtml}</div>' +
                '{ReplayHtml}' +
             '</div>',
            pageIndex: 1, //页码（从1起算）
            pageSize: 20, //页大小
            totalCount: 999, //总记录数
            itemHandler: function (data, itemTemplate, container) {//数据各项处理
                if (!data.Comment) { return; };
                data.Comment.ScoreHtml = '';

                var i = 0;
                for (; i < data.Comment.Score; i++) {
                    data.Comment.ScoreHtml += '<li class="active"></li>';
                }
                for (; i < 5; i++) {
                    data.Comment.ScoreHtml += '<li></li>';
                }
                data.Comment.ImgHtml = '';
                try {
                    var imgList = $.parseJSON(data.Comment.ImageUrl);
                    if (imgList.length > 0) { data.Comment.ImgHtml = '<ul>'; }
                    $(imgList).each(function () {
                        var src = ($.cookie('imagesvr') ? $.cookie('imagesvr') : '') + this.FilePath + '.thumb.'  + this.FileExt;
                        var srcBig = ($.cookie('imagesvr') ? $.cookie('imagesvr') : '') + this.FilePath;
                        data.Comment.ImgHtml += '<li><img onclick="zoomCommentImg(this)"  src="' + src + '" src-big="' + srcBig + '" /></li>';

                    });
                    if (imgList.length > 0) { data.Comment.ImgHtml += '</ul>'; }
                } catch (e) { }
                data.Comment.ReplayHtml = '';
                data.Comment.RecordDate= getMonDayString(data.Comment.RecordDate);
                var repTemp = '<div class="manager">' +
                     '<div>' +
                        ' <span>[{AppTitle}]：</span><p>{RecordDate}</p>' +
                     '</div>' +
                     '<div class="imglist">' +
                         '{Content}' +
                     '</div>' +
                 '</div>';

                if(data.Comment.AppendStatus == 1){
                
                    var appendImageHtml = '';
                    if (data.Comment.AppendImage) {
                        var imgArr = $.parseJSON(data.Comment.AppendImage);
                        var imgHtml = '';
                        $(imgArr).each(function () {
                            var src = ($.cookie('imagesvr') ? $.cookie('imagesvr') : '') + this.FilePath + '.thumb.'  + this.FileExt;
                            var srcBig = ($.cookie('imagesvr') ? $.cookie('imagesvr') : '') + this.FilePath;
                            imgHtml += '<li><img onclick="zoomCommentImg(this)"  src="' + src + '" src-big="' + srcBig + '" /></li>';
                        });
                        appendImageHtml = '<ul>' + imgHtml + '</ul>'
                    }
                    data.Comment.ReplayHtml += repTemp.format({AppTitle:'买家追评',RecordDate:getMonDayString(data.Comment.AppendTime),Content:('<div>'+data.Comment.AppendContent+'</div>' + appendImageHtml) });
                }

                $(data.ReplyList).each(function () {
                    this.AppTitle = 'DV·商城客服';
                    // this.RecordDate=getMonDayString(this.RecordDate); // 时间
                    this.RecordDate = '';
                    data.Comment.ReplayHtml += repTemp.format(this);
                });


                return itemTemplate.format(data.Comment);
            },
            afterHandleResult: function (result, totalCount, container) {
                // var countObj = { all: 0, good: 0, notbad: 0, bad: 0 };
                // $(result.ScoreCounter).each(function () {
                //     if (this.score == 5 || this.score == 4 ) { countObj.good += this.counter };
                //     if (this.score == 3 || this.score == 2 ) { countObj.notbad += this.counter };
                //     if (this.score == 1) { countObj.bad += this.counter };
                //     countObj.all += this.counter;
                // });
                var allCountText=result.AllCounter;
                if(allCountText>999)allCountText='999+';
                var ImageCounter=result.ImageCounter;
                if(ImageCounter>999)ImageCounter='999+';
                $('#counter0').text(allCountText);
                $('#counter1').text(ImageCounter);
                // $('#counter1').text(countObj.good);
                // $('#counter2').text(countObj.notbad);
                // $('#counter3').text(countObj.bad);
            },
            command: 'Pub.LoadCommentList',
            // parameter: { TargetKind: 'PRODUCT', TargetCode: '<%=Request["no"]%>', ScoreMax: scoreMax, ScoreMin: scoreMin }
            parameter: { TargetKind: 'PRODUCT', TargetCode: '<%=Request["no"]%>', HasImag: HasImag, ScoreMax: 5, ScoreMin: 1 }
        });
        handler.nextPage();
    }

    
    function zoomCommentImg(ui) {
        if (!window.wx) {
            return ;
        }
        $this = $(ui);
        var urllist = [];
        $this.parents('ul').find('img').each(function(index, el){
            var srcBig = $(el).attr('src-big');
             urllist.push(srcBig || $(el).attr('src'));
        });
         wx.previewImage({
         current:$this.attr('src-big') || $this.attr('src'), // 当前显示图片的http链接
         urls: urllist // 需要预览的图片http链接列表
         });
    }

    function addFavorite(ui) {
        $(ui).executeCommand({
            successCallBack: function (result, totalCount) {
                showTips("收藏成功！");
                $(ui).after('<a class="ui-link ui-btn ui-shadow ui-corner-all ui-mini" data-mini="true" data-role="button" href="javascript:void(0);" role="button"><img src="images/prodetails_btn2.png">取消收藏</a>').remove();;
            }
        }, 'Member.AddFavoriteTarget', { TargetKind:'PRODUCT', TargetCode: '<%=Request["no"]%>', TargetTitle: productDetail.Data.ProductName,Remark:productDetail.Data.ShortDesc, TargetImg:productDetail.Data.ThumbnailImg, TargetUrl:'/wap/shop/productdetail.aspx?no=<%=Request["no"]%>' });
    }


    function selectTip(){     
        $(window).scrollTop($('.skuHandler').eq(0).offset().top-120);

        $('.skuHandler').addClass("selectTip");
        setTimeout(function(){
            $('.skuHandler').removeClass("selectTip");
        }, 3000);
    }
    var PromotionTitle = '';
    ///加载优惠信息
    function LoadPromotionDetail(){
        var days = new Date()
        if ('<%=Request["date"] %>'!="") {
            days=new Date('<%=Request["date"] %>');
        }
        var year = days.getFullYear(),Month = days.getMonth()+1,day = days.getDate(),hour = days.getHours(),Minutes = days.getMinutes(),Seconds = days.getSeconds();
        var datas = year+'/'+Month+'/'+day+' '+hour+':'+Minutes+':'+Seconds;

        $(document).executeCommand({
            successCallBack: function (result, totalCount) {
            if(!result.Data) {
                return ;
            }
            //优惠券显示
                if(result.Data.CouponRule && result.Data.CouponRule[ProductNos]){
                    var CouponContent = '';
                    $(result.Data.CouponRule[ProductNos]).each(function(){
                        CouponContent +=this.Title+' ';
                    });
                    var XiangLiangHtml= '<li class="XLDiscount" onclick="location.href=\''+result.Data.CouponRule[ProductNos][0].Url+'\'" >'+
                                '<span class="coupon">优惠券</span>'+
                                '<div data-ajax="false">'+CouponContent+'</div></li>';
                    $('.privilege_box ul').append(XiangLiangHtml);
                };
            //优惠显示
                if(result.Data.PromotionRule && result.Data.PromotionRule[ProductNos]){
                    var PromotionContent = '';
                    var PromotionContentHtml = '<p>{Memo}</p>'+'<span class="xiangliang">{LimitedText}</span>';
                    var PromotionContentHtmls = '<p>{Memo}</p>';
                    var This = result.Data.PromotionRule[ProductNos];
                    if(This.Counter){This.Limited = This.Counter.Total - This.Counter.Current;};

                    //判断subtype类型
                    switch (This.SubType) {
                        case "discount":This.SubType='直降';break;
                        case "conditional_discount":This.SubType='满减';break;
                        case "shipfee":This.SubType='包邮';break;
                        case "coupon":This.SubType='优惠券';break;
                        case "conditional_gift":This.SubType='满赠';break;
                        case "gift":This.SubType='买赠';break;
                        case "limit":This.SubType='限制';break;
                        default:This.SubType="";break;
                    }
                    if (This.Counter && This.Counter.Total!=0) {
                        if(This.Limited > 0){
                            This.LimitedText = '限量:' + This.Limited +'份';
                        } else {
                            This.LimitedText = '已抢完';
                        }
                        if(This.Type != 1){
                            PromotionContent += PromotionContentHtml.format(This);
                        };
                        if(This.Type == 1 && This.Priority == 1){
                            PromotionContent += PromotionContentHtml.format(This);
                        };
                        PromotionTitle += '<span class="PromotionContent">'+This.SubType + '</span>';
                    } else {
                        if(This.Type != 1){
                            PromotionContent += PromotionContentHtmls.format(This);
                        };
                        if(This.Type == 1 && This.Priority == 1){
                            PromotionContent += PromotionContentHtmls.format(This);
                        };
                        PromotionTitle += '<span class="PromotionContent">'+This.SubType + '</span>';
                    }


                    PromotionTitleHtml= '<li class="XLDiscount FoldDiscount" onclick="location.href=\''+This.Url+'\'">'+
                                '<div data-ajax="false">'+PromotionTitle+PromotionContent+'</div></li>';
                    $('.privilege_box ul').append(PromotionTitleHtml);
                };
            }
        }, 'Pub.LoadProductPromotionDetail', {"ProductNoList":[ProductNos],"CheckTime":datas});
    };

//    function lauchMore(){
//        $('.suspension_icon div:nth-child(1)').click(function(){
//            $(this).css('display','none');
//            $('.suspension_icon .more').show();
//            $('.suspension_icon .more .home').animate({'left':'-5px'},100);
//            $('.suspension_icon .more .me').animate({'left':'-45px'},100);
//            $('.suspension_icon .more .search').animate({'left':'-50px'},100);
//        });
//        $('.suspension_icon .more .close').click(function(){
//            $(this).parent().css('display','none');
//            $('.suspension_icon .more .home').css({'left':0});
//            $('.suspension_icon .more .me').css({'left':0});
//            $('.suspension_icon .more .search').css({'left':0});
//            $('.suspension_icon div:nth-child(1)').show();
//        });
//    }
//    lauchMore();

    function moredetails(){
        $('.moredetails').click(function(){
            $(this).hide();
            $('.productcommodityDesc').show();
            $('.moredetails').executeCommand({
                successCallBack: function (result) {
                    $('.commoditydesc').data('content', result.Description);
                    $('.commodityparam').data('content', result.ParamContent);
                    $('.productcommodity').html($('.productcommodityDesc ul.header li.active').data('content'));
                    if(!isWifi){
                        $(window).scrollTop($('.productcommodityDesc').offset().top - 200);
                    }
                }
            }, 'Pub.LoadProductDetailDesc', { ProductNo: '<%=Request["no"] %>' });
            
            $('.productcommodityDesc ul.header li').click(function () {
                $('.productcommodityDesc ul.header li').removeClass('active');
                $(this).addClass('active');
                $('.productcommodity').html($('.productcommodityDesc ul.header li.active').data('content'));
            });
        });
        $(document).scroll(function(){
            if($(window).scrollTop() > $('.productcommodityDesc').offset().top){
                $('#productcommoditytabs').addClass('fixedhead')
            }else{
                $('#productcommoditytabs').removeClass('fixedhead')
            }
        });
    }

    moredetails();


    function zoomProdImg(ui) {
        $this = $(ui);
        var urllist = [];
        $('.slide img').each(function(){ 
            if(urllist.indexOf($(this).attr('src')) < 0)
            {
                urllist.push($(this).attr('src'));
            }
        });
        wx.previewImage({
        current: $this.attr('src'), // 当前显示图片的http链接
        urls: urllist // 需要预览的图片http链接列表
        });
    }
    ///加载优惠信息
//    function LoadPromotionList(){
//    var tagid=$($('[prop="Data\\.TagIds"]'),$(".privilege_box")).text();
//    if(tagid==''){
//        return;
//    }
////    $('.privilege_box').executeCommand({
//            successCallBack: function (result) {
//            var protiomHtml= '<li class="DiscountType">'+
//                                '{TagType}'+
//                                '<div onclick="location.href=\'/wap/shop/ProductListByTag.aspx?tag={Id}\'" data-ajax="false">{TagName}</div>'+
//                            '</li>';
//                  var kindArr = ["Coupon","Discount","ForTips","Forsale"]; //满送，满减，提示
//                if (result.List.length > 0) {
//                    $(result.List).each(function(){
//                        if (this.Kind && kindArr.indexOf(this.Kind)>-1) {
//                                    switch (this.Kind) {
//                                        case "Coupon":this.TagType='<span class="coupon">满送</span>';break;
//                                        case "Discount":this.TagType='<span class="discount">满减</span>';break;
//                                        case "Forsale":this.TagType='<span class="forsale">直降</span>';break;
//                                        default:this.TagType="";break;
//                                    }
//                            $('.privilege_box ul').append(protiomHtml.format(this));
//                            $('#promotionlist').show();
//                        }
//                    });
//                }
//            }
//            }, 'Pub.LoadProductTags', { TagIds: tagid});
//   }

</script>

<script type="text/javascript">
//评论滚动
//    var n = 1;
//    var interval;
//    $('.evaluate_box .grade:nth-child(1)').css('z-index', 1);
//    function rungrade() {
//        $('.evaluate_box .grade:nth-child(' + n + ')').animate({ 'top': '-60px' }).css({ 'top': 0 });
//        if ($('.evaluate_box .grade').length == n) {
//            n = 0;
//        }
//        n++;
//        $('.evaluate_box .grade:nth-child(' + n + ')').css({ 'top': '60px', 'z-index': n }).animate({ 'top': 0 });
//        
//    }
//    interval = setInterval(rungrade, 2000);

    //获取日期 mm-dd
    function getMonDayString(dateTimeString) {
        var mydate = new Date(dateTimeString.replace(/\-/g, "\/"));
        var dateMon = mydate.getMonth() + 1;
        var dateDay = mydate.getDate();

        var tempDate = (dateMon < 10 ? "0" + dateMon : dateMon) + "-" + (dateDay < 10 ? "0" + dateDay : dateDay);
        return tempDate;
    }

    function shopChutwo(result,product) {
        var _buyOrcart = 3;
        var buy_enable = true;
        //处理虚拟产品
        if (result.Data.IsVirtual == '1') {
            $("#bt_buynow>a").text("立即购买").css({ 'background': '#f9384d' }); 
            _buyOrcart = 1;
        };


        //处理下架产品
        if (result.Data.Status != '1') {
            if(result.Data.IsVirtual != '1'){
                if (result.Data.Storage <= 0 && result.Data.Status == '0') {
                    $("#bt_buynow>a").text("售罄").css({'background':'#ccc'});
                    $("#bt_buynow>a").addClass("offline");
                    buy_enable = false;
                    _buyOrcart = 2
                } else {
                    $("#bt_buynow>a").text("已下架").css({ 'background': '#ccc' });
                    $("#bt_buynow>a").addClass("offline");
                    buy_enable = false;
                    _buyOrcart = 2
                };
            }
        }else{
                var buy_STenable = true; //是否开售
                var buy_ETenable = false;//是否结束
                   
                if (result.Data.StartTime) {
                    var date = new Date(Date.parse(result.Data.StartTime.replace(/-/g, "/")));

                    if (date.getTime() > new Date().getTime()) {
                        buy_enable = false;
                        $("#bt_buynow>a").text("即将开售").css({ 'background': '#ccc' });
                        _buyOrcart = 2;

                        //设置为需要倒数
                        if (result.IsSpecialOffer.indexOf('ST') >= 0) {
                            $('div.countdown').show().countdown(result.Data.StartTime.replace(/-/g, "/")).on('update.countdown', function (event) {
                                var $this = $(this).html(event.strftime(''
                                    + '距开售还有<span style="color:#f9384d;margin:0 2px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%D</span>天'
                                    + '<span style="color:#f9384d;margin:0 6px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%H</span>时'
                                    + '<span style="color:#f9384d;margin:0 6px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%M</span>分'
                                    + '<span style="color:#f9384d;margin:0 6px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%S</span>秒'));
                            });
                        }
                        buy_STenable = false;//未开售
                    }
                }
                //结束
                if (result.Data.EndTime && buy_STenable) {//设置结束时间，并且已经开售
                    var date = new Date(Date.parse(result.Data.EndTime.replace(/-/g, "/")));
                    if (date.getTime() < new Date().getTime()) {
                        buy_enable = false;
                        $("#bt_buynow>a").text("已结束").css({ 'background': '#ccc' });
                        buy_ETenable = true;
                        _buyOrcart = 2;
                        $("#bt_buynow>a").addClass("offline");
                    } else {
                    //sku选中
                        //设置为需要倒数
                        if (result.IsSpecialOffer.indexOf('ET') >= 0) {
                            $('div.countdown').show().countdown(result.Data.EndTime.replace(/-/g, "/")).on('update.countdown', function (event) {
                                var $this = $(this).html(event.strftime(''
                                    + '距结束还有<span style="color:#f9384d;margin:0 6px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%D</span>天'
                                    + '<span style="color:#f9384d;margin:0 6px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%H</span>时'
                                    + '<span style="color:#f9384d;margin:0 6px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%M</span>分'
                                    + '<span style="color:#f9384d;margin:0 6px;font-size:14px;background-color: #feeb9b;padding: 2px;font-weight: bold;border-radius: 4px;">%S</span>秒'));
                            });
                        }
                    }
                }
                if (product && buy_STenable && !buy_ETenable) { //已经开始，未结束
                    if (product.Storage <= 0) {
                        buy_enable = false;
                        $("#bt_buynow>a").text("售罄").css({ 'background': '#ccc' });
                        $("#bt_buynow").addClass("offline");
                        _buyOrcart = 2;
                    }
                    else {
                        if (result.Data.IsVirtual != '1') {
                            $("#bt_buynow>a").text("加入购物车").css({ 'background': '#f9384d' });
                            $("#bt_buynow").removeClass("offline");
                            _buyOrcart = 3;
                        } else {
                            $("#bt_buynow>a").text("立即购买").css({ 'background': '#f9384d' });
                            $("#bt_buynow").removeClass("offline");
                            _buyOrcart = 1;
                        };
                        buy_enable = true;
                    };
                };
            };
        $('#toolbar').show();
        if (buy_enable) {
            $('#toolbar li a').click(function (event) {
                if (_buyOrcart == 1) {
                    submitOrder($(this), event);
                } else if (_buyOrcart == 3) {
                    selectProduct($(this), event);
                };
            });
        } else {
        $('#toolbar a').unbind('click');
            $("#bt_buynow").addClass("offline");
        }
    }

    var slider3 = document.getElementsByClassName('slider3')[0];
    var productcommodityDesc = document.getElementsByClassName("productcommodityDesc")[0]
    slider3.addEventListener('touchend', function() {
        if (Math.abs(parseInt(this.style.transform.split('(')[1].split(',')[0]))> (document.getElementsByTagName('html')[0].offsetWidth * (Num - 1) + 5 * (Num - 1)) + 90 ) {
                $('.moredetails').hide();
                $('.productcommodityDesc').show();
                $('.moredetails').executeCommand({
                    successCallBack: function(result) {
                        $('.commoditydesc').data('content', result.Description);
                        $('.commodityparam').data('content', result.ParamContent);
                        $('.productcommodity').html($('.productcommodityDesc ul.header li.active').data('content'));
                        if (!isWifi) {
                            $(window).scrollTop($('.productcommodityDesc').offset().top);
                        }else{
                            $(window).scrollTop($('.productcommodityDesc').offset().top);
                        }
                    }
                }, 'Pub.LoadProductDetailDesc', { ProductNo: '<%=Request["no"] %>' });
                
            $('.productcommodityDesc ul.header li').click(function() {
                $('.productcommodityDesc ul.header li').removeClass('active');
                $(this).addClass('active');
                $('.productcommodity').html($('.productcommodityDesc ul.header li.active').data('content'));
            });
        }

    }, false)

</script>
</asp:Content>

